const HDWalletProvider = require('@truffle/hdwallet-provider');
const Web3 = require('web3');

provider = new HDWalletProvider(
    '0x65d8422538a64ed7511ce40ebbc8cae201d68d1b7b9f69e9cbce3f719ab89dd1',
    'http://127.0.0.1:8545'
  );
  
const web3 = new Web3(provider);

// Log the current block number to the console
web3.eth
  .getBlockNumber()
  .then(result => {
    console.log("Current block number: " + result)
  })
  .catch(error => {
    console.error(error)
  })